package org.ix.dynamicapis.model.response;

import com.alibaba.excel.annotation.ExcelProperty;
import org.ix.dynamicapis.excel.*;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.math.BigDecimal;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@ApiModel(description = "接口配置列表元素响应实体")
@Getter
@Setter
@ToString
public class ApiListItemResponse implements Serializable {

    @ExcelProperty(value = "接口ID", index = 0)
    @ApiModelProperty(value = "接口ID", position = 0)
    private Integer id;

    @ExcelProperty(value = "所属业务系统", index = 1)
    @ApiModelProperty(value = "所属业务系统", position = 1)
    private String systemCode;

    @ExcelProperty(value = "数据来源", index = 2)
    @ApiModelProperty(value = "数据来源", position = 2)
    private String datasource;

    @ExcelProperty(value = "接口说明", index = 3)
    @ApiModelProperty(value = "接口说明", position = 3)
    private String name;

    @ExcelProperty(value = "版本 (格式：v主版本号-次版本号)", index = 4)
    @ApiModelProperty(value = "版本 (格式：v主版本号-次版本号)", position = 4)
    private String version;

    @ExcelProperty(value = "主题", index = 5)
    @ApiModelProperty(value = "主题", position = 5)
    private String topic;

    @ExcelProperty(value = "接口路径", index = 6)
    @ApiModelProperty(value = "接口路径", position = 6)
    private String apiPath;

    @ExcelProperty(value = "sql返回结果 (1:List, 2:Object)", index = 7)
    @ApiModelProperty(value = "sql返回结果 (1:List, 2:Object)", position = 7)
    private Integer resultType;

    @ExcelProperty(value = "MyBatis的执行sql", index = 8)
    @ApiModelProperty(value = "MyBatis的执行sql", position = 8)
    private String mybatisSql;

    @ExcelProperty(value = "是否有参数(0否, 1是)", index = 9)
    @ApiModelProperty(value = "是否有参数(0否, 1是)", position = 9)
    private Integer hasParams;

    @ExcelProperty(value = "是否临时接口 (0否，1是)", index = 10)
    @ApiModelProperty(value = "是否临时接口 (0否，1是)", position = 10)
    private Integer temporary;

    @ExcelProperty(value = "过期时间", index = 11, converter = LocalDateTimeConverter.class)
    @LocalDateTimeFormat
    @ApiModelProperty(value = "过期时间", position = 11)
    private LocalDateTime expires;

    @ExcelProperty(value = "是否可以缓存(0否, 1是)", index = 12)
    @ApiModelProperty(value = "是否可以缓存(0否, 1是)", position = 12)
    private Integer cacheable;

    @ExcelProperty(value = "缓存时长 (单位:分钟，默认一天)", index = 13)
    @ApiModelProperty(value = "缓存时长 (单位:分钟，默认一天)", position = 13)
    private Integer cacheTime;

    @ExcelProperty(value = "备注", index = 14)
    @ApiModelProperty(value = "备注", position = 14)
    private String remark;

    @ExcelProperty(value = "扩展信息", index = 15)
    @ApiModelProperty(value = "扩展信息", position = 15)
    private String extInfo;

    @ExcelProperty(value = "是否删除(0否, 1是)", index = 16)
    @ApiModelProperty(value = "是否删除(0否, 1是)", position = 16)
    private Integer deleted;

    @ExcelProperty(value = "创建人", index = 17)
    @ApiModelProperty(value = "创建人", position = 17)
    private String createUser;

    @ExcelProperty(value = "修改人", index = 18)
    @ApiModelProperty(value = "修改人", position = 18)
    private String updateUser;

    @ExcelProperty(value = "创建时间", index = 19, converter = LocalDateTimeConverter.class)
    @LocalDateTimeFormat
    @ApiModelProperty(value = "创建时间", position = 19)
    private LocalDateTime createTime;

    @ExcelProperty(value = "更新时间", index = 20, converter = LocalDateTimeConverter.class)
    @LocalDateTimeFormat
    @ApiModelProperty(value = "更新时间", position = 20)
    private LocalDateTime updateTime;
}
